@model OurWedding1.Models.Task
@using OurWedding1

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Name)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Name)
    @Html.ValidationMessageFor(model => model.Name)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Deadline)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Deadline)
    @Html.ValidationMessageFor(model => model.Deadline)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.isDone)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.isDone)
    @Html.ValidationMessageFor(model => model.isDone)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.GuestId)
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.GuestId, ((IEnumerable<OurWedding1.Models.Guest>)ViewBag.PossibleGuests).Select(option => new SelectListItem {
        Text = (option == null ? @Resources.None : option.Name), 
        Value = option.GuestId.ToString(),
        Selected = (Model != null) && (option.GuestId == Model.GuestId)
    }), @Resources.Choose)
    @Html.ValidationMessageFor(model => model.GuestId)
</div>
<div class="editor-label">
    @Html.LabelFor(model => model.ExpenseId)
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.ExpenseId, ((IEnumerable<OurWedding1.Models.Expense>)ViewBag.PossibleExpenses).Select(option => new SelectListItem {
        Text = (option == null ? @Resources.None : option.Name), 
        Value = option.ExpenseId.ToString(),
        Selected = (Model != null) && (option.ExpenseId == Model.ExpenseId)
    }), @Resources.Choose)
    @Html.ValidationMessageFor(model => model.ExpenseId)
</div>
